class Video{
  final int id;
  final String pic;
  final String view;
  final String duration;
  final String title;
  final String owner;
  final int videoId;

  final String addTime;
  final String tag;
  final int send;
  final int zan;
  final String content;
  final String avatar;


  Video(
      this.id,
      this.pic,
      this.view,
      this.duration,
      this.title,
      this.owner,
      this.videoId,
      this.addTime,
      this.tag,
      this.send,
      this.zan,
      this.content,
      this.avatar);

  Video.fromJson(Map<String, dynamic> json)
  : id = json['id'],
        pic = json['pic'],
        view = json['view'],
        duration = json['duration'],
        title = json['title'],
        owner = json['owner'],
        videoId = json['videoId'],
        addTime = json['addTime'],
        tag = json['tag'],
        send = json['send'],
        zan = json['zan'],
        content = json['content'],
        avatar = json['avatar'];

  Map<String, dynamic> toJson() =>
      <String, dynamic>{
        'id': id,
        'pic': pic,
        'view': view,
        'duration': duration,
        'title': title,
        'owner': owner,
        'videoId': videoId,
        'addTime': addTime,
        'tag': tag,
        'send': send,
        'zan': zan,
        'content': content,
        'avatar': avatar,
      };

  @override
  String toString() {
    return 'Video{id: $id, pic: $pic, view: $view, duration: $duration, title: $title, owner: $owner, videoId: $videoId, addTime: $addTime, tag: $tag, send: $send, like: $zan, content: $content, avatar: $avatar}';
  }
}